package dshop.model;

import java.util.Date;

import com.jfinal.plugin.activerecord.Db;

import appbase.jfinal.ext.BaseModel;

public class LoginHistory extends BaseModel<LoginHistory>{
	
	private static final long serialVersionUID = -6967680902549117464L;
	
	public static final LoginHistory dao = new LoginHistory();

	private static final String LOGOUT_TYPE_FORCE = "FORCE";
	
	
	public static void setLogoutForceBy(String accessToken, int accountId) 
	{
		String sql = " update login_history set logout_date_time = ?, logout_type = ? where access_token = ? and account_id = ? ";
		Db.update(sql, new Date(), LOGOUT_TYPE_FORCE, accessToken, accountId);
	}

	


}
